<include file="public@header" />
</head>
<body>
	<div class="wrap js-check-wrap">
		<ul class="nav nav-tabs">
			<li class="active"><a href="{:url('Office/notice')}">通知管理</a></li>
            <li><a href="{:url('Office/noticeadd')}">添加通知</a></li>
		</ul>
        <form class="well form-search" method="get" action="{:url('Office/notice')}">
            发送人姓名:
            <input type="text"  class="form-control" name="user_nickname" value="{:input('request.user_nickname/s','')}" placeholder="请输入发送人姓名">
            <input type="submit" class="btn btn-primary" value="搜索" />
            <a class="btn btn-danger" href="{:url('Office/notice')}">清空</a>
        </form>
		<table class="table table-hover table-bordered">
			<thead>
				<tr>
					<th width="20%">标题</th>
                    <th width="50%">内容</th>
					<th width="5%">发送人</th>
                    <th width="12%">发送时间</th>
					<th width="10%">{:lang('ACTIONS')}</th>
				</tr>
			</thead>
			<tbody>
				<foreach name="results" item="vo">
				<tr>
                    <td>{$vo['notice_title']}</td>
					<td>{$vo['notice_content']}</td>
					<td>
						{$vo['user_nickname']}
					</td>
                    <td><php>echo date('Y-m-d H:i:s', $vo['add_time'])</php></td>

					<td>
						<a class="js-ajax-delete" href="{:url('Office/notice_delete',array('id'=>$vo['id']))}">{:lang('DELETE')}</a>
                        |
                        <a href="javascript:void(0)" onclick="noticeLook({$vo['id']})" name="noticeid">查看</a>
					</td>
				</tr>
				</foreach>
			</tbody>
		</table>
		<div class="pagination">{$page}</div>
	</div>
	<script type="text/javascript" src="__STATIC__/js/admin.js?v={:time()}"></script>
	<script type="text/javascript" src="__STATIC__/js/layer/layer.js"></script>
	<script>

		/*$("#btnlook").click(function(){
			var id= $('#btnlook').val();
			var url = "{:url('Office/noticelook',array('id'=>"+id+"))}";

			layer.open({
				type: 2,     //包括但不限于一个值 ，具体 可以去查看  2  就是URL
				title: '查看接收人',
				shadeClose: true,       //我觉着应该再加个onclick shade 遮罩层  Close  关闭
				shade: 0.6,             //遮罩层 透明度
				area: ['60%', '60%'],   //大小
				content: url,            //这个和type  有关系，比如type = 1   content='这里可以直接写'
			});
		});*/

		function noticeLook(id){

			layer.open({
				scrollbar: false,
				type: 2,
				title: '查看接收人',
				shade: 0.6,
				area: ['600px', '700px'],
				content: "{:url('/admin/office/noticelook/id/"+id+"')}"
			})
		}

	</script>

</body>
</html>